<script setup></script>

<template>
  <!DOCTYPE html>
  <html lang="zh-CN">
    <head>
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>听雨</title>
    </head>

    <body>
      <div class="menu">
        <div class="menu-item">计算机基石</div>
        <div class="menu-item">编程语言</div>
        <div class="menu-item">大模型</div>
        <div class="menu-item">中间件</div>
        <div class="menu-item">
          <!-- 一级菜单 -->
          <div>开发框架</div>

          <!--二级菜单 -->
          <div class="second-menu">
            <div class="second-menu-item">vue</div>
            <div class="second-menu-item">spring</div>
            <div class="second-menu-item">springBoot</div>
          </div>
        </div>
        <div class="menu-item">开发工具</div>
        <div class="menu-item">工程实践</div>
        <div class="menu-item">求职</div>
        <div class="menu-item">相册</div>
        <div class="menu-item">随笔</div>
      </div>
      <div class="typeout">山雨欲来风满楼</div>
      <div class="content-conatiner">
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="content">
          <img src="@/assets/img/java_logo.svg" alt="java" class="cover" />
          <div class="article">
            <div class="title">天王盖地虎</div>
            <div class="bref">文章简介。。。。。。。。</div>
            <!-- 添加时间logo -->
            <div class="time-logo">
              <img src="@/assets/img/time-clock.svg" alt="time" class="time" />
              <div>2023-03-15</div>
            </div>
          </div>
        </div>
        <div class="button-more">加载更多</div>
      </div>
    </body>
  </html>
</template>

<style scoped>
/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 14px;
}

body {
  font-family: sans-serif;
  background-color: #f2f3f5;
}

.menu {
  height: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 30px;
  width: 70%;
  margin: 0 auto;
  position: sticky;
  z-index: 100;
  top: 0;
  /* 菜单透明 */
  background-color: rgba(255, 255, 255, 0.95);
}

.menu-item {
  cursor: pointer;
  position: relative;
  /* 添加过渡效果，使字体变化更平滑 */
}

.menu-item:hover {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 10px;
  transition: font-size 0.1s ease;
  transform: scale(1.1);
}

.second-menu {
  position: absolute;
  top: 40px;
  width: 100px;
  background-color: aliceblue;
}

.second-menu-item {
  padding: 10px;
}
.second-menu-item:hover {
  color: black;
}

.content-conatiner {
  width: 70%;
  margin: 0 auto;
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.content {
  width: 100%;
  height: 170px;
  border-radius: 2%;
  display: flex;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content .cover {
  background-color: #3a6d82;
  height: 100%;
  border-radius: 2%;
  padding: 3%;
}

.content .article {
  background-color: #fff;
  border-radius: 2%;
  width: 100%;
  padding: 20px;
}

/* 当鼠标悬浮在内容区域时，内容区域添加阴影、放大、和彩色边框效果 */
.content:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: scale(1.02);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid #2563eb;
  border-radius: 0%;
}

.margin-top {
  margin-top: 10px;
}

.article .bref {
  margin-top: 20px;
}

.typeout {
  margin: 10px 15%;
  height: 36px;
  line-height: 36px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #0ea5a4);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.12);
}

/* 按钮： 加载更多 */
.button-more {
  height: 35px;
  background-color: #3a6d82;
  cursor: pointer;
  line-height: 35px;
  color: white;
  width: 82px;
  text-align: center;
  border-radius: 5px;
  margin: 20px 0 50px 0;
}

.button-more:hover {
  background-color: #2563eb;
  transition: all 0.3s ease;
}

.article .title {
  font-size: 16px;
}

.time-logo {
  display: flex;
  gap: 5px;
  margin-top: 50px;
  color: gray;
  width: fit-content;
  height: 20px;
  line-height: 20px;
}
</style>
